bin = mythread
cc = g++
src = $(wildcard *.cc)
obj = $(src:.cc=.o)
$(bin): $(obj)
	$(cc) -o $@ $^ -lpthread
$(obj): $(src)
	$(cc) -c $< -std=c++11
.PHONY: clean
clean:
	rm -f $(obj) $(bin)